import request from '@/router/axios';
import {baseUrl} from "../../config/env";

export const getList = (current, size, params) => {
  return request({
    url: baseUrl +  '/api-file/info/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: baseUrl +  '/api-file/info/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: baseUrl +  '/api-file/info/'+ids,
    method: 'delete',
    // params: {
    //   ids,
    // }
  })
}

export const add = (row) => {
  return request({
    url: baseUrl +  '/api-file/info/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: baseUrl + '/api-file/info/submit',
    method: 'post',
    data: row
  })
}

export const uploadBase64 = (row) => {
  return request({
    url: baseUrl + '/api-file/info/uploadBase64',
    method: 'post',
    data: row
  })
}

export const upload = (row) => {
  return request({
    url: baseUrl + "/api-file/info/upload",
    method: 'post',
    data: row
  })
}


